class Car{
    var number:String=""
    var brand:String=""
    var color:String=""
    var price:String=""
    var oilNum:Double=100.0

    def drive():Unit={
        println("The car is moving")
    }

    def stop():Unit={
        println("Stop the car")
    }

    def refuel(num:Double):Unit={
        oilNum=oilNum+num
    }
}

class ElectricCar(val capacity:Double,var course:Double) extends Car(){
    def drivess(total:Double):Unit={
        if(course>total){
            println("The car is moving")
        }else{
            println("The car is out of gas")
        }
    }
}